import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);

const state = {
    msg:{type:"success", content:"", count:0},
    //其他属性...
 }
 const mutations={
     showInfoMsg( state,content){
         return func(state,content)
     }

     ,
        func(state, content) {
        console.log("show info msg:", content);
        state.msg.type = "info";
        state.msg.content = content;
        state.msg.count = state.msg.count + 1;
      }
    
 }
const store = new Vuex.Store({
    state,
    mutations
});
 
export default store;